import http from "@/api/axios";

export const getListApi = (data: DetainGoods.SearchParams) => {
  return http({
    method: "post",
    url: "/base/biz/bizPreOrderShipment/detentionPage",
    data
  });
};
// 获取标签页 各状态 数量
export const getPageStaticApi = (data: DetainGoods.SearchParams) => {
  return http({
    method: "post",
    url: "/base/biz/bizPreOrderShipment/detentionPageStat",
    data
  });
};
// 申请放货
export const applyReleaseCargoApi = (data: DetainGoods.ApplyReleaseCargo) => {
  return http({
    method: "post",
    url: "/base/biz/preOrderShipmentReleaseApply/releaseApply",
    data
  });
};
// 提交报价
export const submitQuotationApi = (data: { id: string; shipmentId: string; waybillNum: string; baseUnitPrice: number; [propsName: string]: any }) => {
  return http({
    method: "post",
    url: "/base/biz/orderShipmentQuotation/submit",
    data
  });
};
// 撤回报价
export const revocationQuotationApi = (data: { id: string }) => {
  return http({
    method: "post",
    url: "/base/biz/orderShipmentQuotation/revocation",
    data
  });
};
// 运单报价日志
export const getOperationLogApi = (data: { waybillNums: string[] }) => {
  return http({
    method: "post",
    url: "/base/biz/orderShipmentQuotation/quotationLogList",
    data
  });
};
// 添加附加费
export const addChargeCostApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/orderShipmentCost/add",
    data
  });
};
// 删除附加费
export const deleteChargeCostApi = (params: { id: string }) => {
  return http({
    method: "delete",
    url: "/base/biz/orderShipmentCost/deleteById",
    params
  });
};
// 根据运单号查询附加费
export const getChargeCostByWabbillApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/orderShipmentCost/queryList",
    data
  });
};
// 运单报价日志
export const getLogApiByWaybillApi = (data: { waybillNums: string[] }) => {
  return http({
    method: "post",
    url: "/base/biz/orderShipmentQuotation/quotationLogList",
    data
  });
};

// 刷新运单单价
export const flushSettlementPriceApi = (data: { id: string }) => {
  return http({
    method: "post",
    url: "/base/biz/bizPreOrderShipment/flushSettlementPrice",
    data
  });
};
